package cn.azzhu.day04;

import cn.azzhu.utils.FlinkUtilsV1;
import org.apache.flink.api.common.functions.RichMapFunction;
import org.apache.flink.api.common.serialization.SimpleStringSchema;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;

/**
 * @author azzhu
 * @create 2020-09-19 13:59:49
 */
public class QueryActivityName {
    public static void main(String[] args) throws Exception {
        DataStream<String> lines =  FlinkUtilsV1.createKafkaStream(args,new SimpleStringSchema());

        final SingleOutputStreamOperator<ActivityBean> beans = lines.map(new DataToActivityBeanFunction());

        beans.print();

        FlinkUtilsV1.getEnv().execute("QueryActivityName");
    }
}
